<template>
  <view class="swiper-course">
    <swiper :style="{'height': (200 * row) + 'rpx'}" next-margin="30rpx">
      <!--  -->
      <swiper-item v-for="(n ,index) in column" :key="index">
        <CourseItem v-for="(courseItem,i) in courseList.slice(index * row, (index + 1) * row)" :key="i" />
      </swiper-item>
    </swiper>
    <!-- <CourseItem /> -->
  </view>
</template>

<script>
  import CourseItem from '@/components/course-item'
  export default {
    components: {
      CourseItem
    },
    props: {
      // 默认有4行
      row: {
        type: Number,
        default: 4
      },
      // 默认有2列
      column: {
        type: Number,
        default: 2
      },
      // 课程列表
      courseList: {
        type: Array,
        default: () => new Array(8)
      }
    },
    data() {
      return {
        
      }
    }
  }
</script>

<style lang="scss">
</style>
